
package harlequin;

import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;


public class GeneralAttendance extends JFrame{
    
    public Connection connector;
    public String tempDate;
    public String fullName;
    public String courseSection;
    public String idNumber;
    public String emailAddress;
    public String organization;
    public String contactNumber;
    
    
public boolean SectionExsists(String section) throws SQLException{
   System.out.println("amp");
   String query = "select * from section";
   PreparedStatement preparedStatement = connector.prepareStatement(query);
   ResultSet set = preparedStatement.executeQuery(query);
    
    
    while(set.next()){
        if(set.getString("courseSection").equals(section) || section.equals(""))
            return true;
    }
    
    return false;
}


        
public boolean InvalidDate(String tempDate) throws SQLException{
   
    String query = "select * from play";
   PreparedStatement preparedStatement = connector.prepareStatement(query);
   ResultSet set = preparedStatement.executeQuery(query);
    
    
    while(set.next()){
        if(set.getString("date").equals(tempDate)) 
            return true;
    }
    
    return false;
}

}
